override fun onCreateView(
inflater: LayoutInflater, container: ViewGroup?,
savedInstanceState: Bundle?
): View? {
val root = inflater.inflate(R.layout.fragment_list_five, container, false)
if (llShelveNames.isEmpty()) {
StoreItems.getShelves().forEach {
llShelveNames.add(
Pair(
it.iShelveID,
it.sName
)
)
}
}
if (llNames.isEmpty()) {
llShelveNames.forEach {
llNames.add(it.second)
}
}
LoginFragment.toast.setText("Bitte code scannen um Lagerplatz zu öffnen.")
LoginFragment.toast.show()
STATIC.bActiveScanner = false
val spinner: Spinner = root.findViewById(R.id.store_select_spinner)
val spinnerAdapter: ArrayAdapter<String> = ArrayAdapter(
requireContext(), R.layout.spinner_item, llNames
)
spinnerAdapter.setDropDownViewResource(R.layout.spinner_item)
spinner.adapter = spinnerAdapter
spinner.onItemSelectedListener = object : AdapterView.OnItemSelectedListener {
override fun onItemSelected(
parent: AdapterView<*>?,
view: View,
position: Int,
id: Long
) {
}
override fun onNothingSelected(parent: AdapterView<*>?) {
}
}
return root
}